package com.springframework.event;

import com.self.springframework.context.ApplicationEvent;
import com.self.springframework.context.ApplicationListener;

public class CustomEventListener implements ApplicationListener<CustomEvent> {
    @Override
    public void onApplicationEvent(CustomEvent event) {
        System.out.println("收到: " + event.getSource());
        System.out.println("消息: " + event.getId() + " : " + event.getMessage());
    }
}
